package study.aop;

import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("test")
public class AopController {

    @GetMapping("p1")
    public Map test(String pa,String pb) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("pa",pa);
        map.put("pb",pb);
        return map;
    }

    @PostMapping("p2")
    public Map test1(Pa pa) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("pa",pa);
        return map;
    }

    @PostMapping("p3")
    public Map test2(@RequestBody Pa pa) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("pa",pa);
        return map;
    }
}
